package top.healthylife.gateway.platform.baihang.api.api.rankauthentication;


import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import top.healthylife.gateway.core.service.ParentFace;
import top.healthylife.gateway.dto.annotation.ApiServiceExplain;
import top.healthylife.gateway.platform.baihang.api.util.BaiHangHttpUtil;
import top.healthylife.gateway.platform.baihang.dto.rankauthentication.face0002.req.BHReqPSFourFaceCheckDto;

/**
 * 公安四要素及人像认证
 * @author gwx
 * @date 2021/9/6
 */
@Slf4j
@Service
@ApiServiceExplain(price = 20 , apiName = "公安四要素及人像认证" , info = "认证居民身份证的姓名、身份证号、有效期起止时间是否匹配，并将人脸照片与公安预留照片进行比对")
public class BHPSFourFaceCheckApi implements ParentFace<BHReqPSFourFaceCheckDto, BHReqPSFourFaceCheckDto> {

    private static final String PRODUCT_CODE = "FACE0002";

    @Override
    public BHReqPSFourFaceCheckDto execute(BHReqPSFourFaceCheckDto reqDto){
        return BaiHangHttpUtil.httpPostRequest(reqDto,PRODUCT_CODE, BHReqPSFourFaceCheckDto.class);
    }
}
